<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>二十一天聊天室</title>
    <meta name="keywords" content="聊天、登录、深圳二十一天健康科技聊天室">
    <meta name="description" content="二十一天在线聊天系统登录页面">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="Author" content="larry">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/layui.css" media="all"/>
    <link rel="stylesheet" href="css/animate.css" media="all"/>
    <link rel="stylesheet" href="css/login.css" media="all"/>
    <script>
        /*检测用户的浏览器是不是ie678版本的*/
        (function(w){if(!("WebSocket"in w&&2===w.WebSocket.CLOSING)){var d=document.createElement("div");d.className="browsehappy";d.innerHTML='<div style="width:100%;height:100px;font-size:20px;line-height:100px;text-align:center;background-color:#E90D24;color:#fff;margin-bottom:40px;">\u6d4f\u89c8\u5668\u7248\u672c\u8fc7\u4f4e\uff0c\u53ef\u80fd\u4f1a\u5f71\u54cd\u60a8\u7684\u6b63\u5e38\u4f7f\u7528\u3002<a target="_blank" href="http://browsehappy.osfipin.com/" style="background-color:#31b0d5;border-color: #269abc;text-decoration: none;padding: 6px 12px;background-image: none;border: 1px solid transparent;border-radius: 4px;color:#FFEB3B;">\u7acb\u5373\u5347\u7ea7</a></div>';var f=function(){var s=document.getElementsByTagName("body")[0];if("undefined"==typeof(s)){setTimeout(f,10)}else{s.insertBefore(d,s.firstChild)}};f()}}(window));
    </script>
</head>
<body>
<div class="larry-main layui-layout animated shake larry-delay2" id="larry_login" style="margin-top: 94px;">
    <div class="title">在线聊天系统</div>
    <p class="info">统一后台登录中心</p>
    <div class="user-info">
        <div class="avatar"><img src="images/admin.png" alt=""></div>
        <form class="layui-form" id="larry_form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">账号:</label>
                <input type="text" id="txtNumber" name="ht_dl_name" style="ime-mode:disabled" required="" lay-verify="required" aautocomplete="off" class="layui-input larry-input" placeholder="请输入您的用户名" autocomplete="off" value="wjl">
            </div>
            <div class="layui-form-item" id="password">
                <label class="layui-form-label">密码:</label>
                <input type="password" id="txtPwd" name="ht_dl_pass" style="ime-mode:disabled" required="" lay-verify="required|password" aautocomplete="off" class="layui-input larry-input" placeholder="请输入您的密码" autocomplete="off" value="123456">
            </div>
            <div class="layui-form-item">
                <input type="button" class="layui-btn larry-btn" value="立即登录" id="btnLogin" name="ht_dl_sub">
            </div>
        </form>
    </div>
    <div class="copy-right">&copy;2018 深圳二十一天健康科技有限公司</div>
</div>
<div class="layui-layer-move"></div>
<ul id="supersized" class="quality" style="visibility: visible;">
    <li class="slide-1 activeslide" style="visibility: visible; opacity: 1;">
        <a target="_blank">
            <img src="images/bg.jpg" style="width: 100%; left: 0px; top: 0px; height: 100%;">
        </a>
    </li>
</ul>
</div>
<script type="text/javascript" src="jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="public.js"></script>
<script type="text/javascript" src="layui.js" ></script>
<script type="text/javascript" src="md5.js" ></script>
<script>
    var layer;
    layui.use('layer', function(){
        layer = layui.layer;
    });
    $(function () {
        if(window.parent.length>0)
            window.parent.location=location;

        $("#btnLogin").click(function () {
            if ($("#txtNumber").val()=="")
            {
                layer.msg("账号不能为空！",{offset: 'c',icon: 6,anim: 6});
                return;
            }
            if($("#txtPwd").val()==""){
                layer.msg("密码不能为空！",{offset: 'c',icon: 6,anim: 6});
                return;
            }
            var user=new Object();
            user.number=$("#txtNumber").val();
            user.password=$("#txtPwd").val();
            doData("login",user,function (result) {
                switch (parseInt(result.code))
                {
                    case 100:
                        layer.msg(result.message,{offset: 'c',icon: 5,anim: 6});
                        break;
                    case 200:
                        $("#txtNumber").val("");
                        $("#txtPwd").val("");
                        location.href="Cvisit/index/"+result.username;
                        break;
                    default:
                        layer.msg("系统登录异常",{offset: 'c',icon: 5,anim: 6});
                        break;
                }
            });
        });
    });
</script>
</body>
</html>